<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        body {
            overflow: hidden;
            zoom: 0.5;
        }
        .canvas {
            margin: 100px auto;
            position: relative;
            width: 1000px;
            height: 540px;
            padding: 45px;
        }
        .frame {
            background: url("frame.png") no-repeat;
            background-size: contain;
            padding: 20px;
        }
        .frame img {
            width: 100%;
        }
        .axle, .mask {
            position: absolute;
            top: 0;
        }

        .mask {
            width: 50%;
            height: 100%;
            background-color: white;
        }

        .left {
            left: calc(-50% + 60px);
        }
        .left .axle {
            right: -5px;
        }

        .right {
            right: calc(-50% + 60px);
        }
        .right .axle {
            left: -9px;
        }

        .playing-animation .left {
            animation: Rolling-Right 3s infinite;
        }

        .playing-animation .right {
            animation: Rolling-Left 3s infinite;
        }

        @-webkit-keyframes Rolling-Right {
            0% {left: calc(-50% + 60px);}
            50% {left: -20px;}
            100% {left: calc(-50% + 60px);}
        }

        @-webkit-keyframes Rolling-Left {
            0% {right: calc(-50% + 60px);}
            50% {right: -20px;}
            100% {right: calc(-50% + 60px);}
        }
        .playing-animation:hover .left, .playing-animation:hover .right{
            animation-play-state: paused !important;
        }
    </style>

    <script>
        function canvasOnClick() {
            let canvas = document.getElementsByClassName("canvas")[0]
            if(canvas.className.indexOf("playing-animation") > -1) {
                canvas.className = "canvas";
            } else {
                canvas.className = "canvas playing-animation";
            }
        }
    </script>
</head>
<body>

<div class="canvas" onclick="canvasOnClick()">
    <div class="left mask">
        <img src="axle.png" class="axle">
    </div>
    <div class="frame">
        <img src="painting.png">
    </div>
    <div class="right mask">
        <img src="axle.png" class="axle">
    </div>
</div>

</body>
</html>